// Modal.scss
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
  animation: fadeIn 0.2s ease-out;
}

.modal-container {
  background: var(--bg-primary);
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  animation: slideUp 0.3s ease-out;
  max-height: 100vh;
  max-width: 100vw;
  min-width: 440px;
  display: flex;
  flex-direction: column;
  
  .modal-header {
    padding: 16px;
    display: flex;
    align-items: center;
    background: var(--bg-dark);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    
    .modal-back-button,
    .modal-close-button {
      background: transparent;
      border: none;
      color: var(--text-secondary);
      cursor: pointer;
      padding: 4px;
      border-radius: 4px;
      z-index: 2;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 16px;
      
      &:hover {
        color: var(--text-primary);
        background: rgba(255, 255, 255, 0.1);
      }
    }
    
    .modal-back-button {
      margin-right: 12px;
    }
    
    .modal-close-button {
      margin-left: auto;
    }
    
    .modal-title {
      margin: 0;
      font-size: 18px;
      font-weight: 600;
      color: var(--text-primary);
      flex: 1;
      
      &.left {
        text-align: left;
        padding-left: 8px;
      }
      
      &.center {
        text-align: center;
        position: absolute;
        left: 0;
        right: 0;
        padding: 0 48px;
      }
    }
  }
  
  .modal-content {
    overflow-y: auto;
    flex: 1;
    
    /* 自定义滚动条 */
    &::-webkit-scrollbar {
      width: 8px;
    }
    
    &::-webkit-scrollbar-thumb {
      background-color: rgba(255, 255, 255, 0.2);
      border-radius: 4px;
    }
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}